const fs = require('fs');
var path = require('path');
function resolveURL(url) {
    var isWin = !!process.platform.match(/^win/);
    if (!isWin) return url;
    return url.replace(/\//g, '\\');
}
var options = {
    key: fs.readFileSync(path.join(__dirname, resolveURL('fake-keys/privatekey.pem'))),
    cert: fs.readFileSync(path.join(__dirname, resolveURL('fake-keys/certificate.pem')))
};
var express = require('express'), //引入express模块
    app = express(),
    server = require('https').createServer(options, app);
app.use('/', express.static(__dirname + '/www')); //指定静态HTML文件的位置
server.listen(3200);


// var express = require('express'), // 引入express模块
//     app = express(),
//     server = require('http').createServer(app);
// app.use('/', express.static(__dirname + '/www')); // 指定静态HTML文件的位置
// server.listen(9002);



